﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace TD.Interface.Credits.Effects
{
    internal class Efx_ZoomIn : Effect
    {
        private Matrix matrix;
        private float zoom;

        public Efx_ZoomIn() :
            base(10)
        {
            matrix = Matrix.Identity;
            zoom = 0.0f;
        }

        protected override void TriggerEfx()
        {
            if (zoom < 1.0f)
                zoom += 0.05f;
            matrix = Matrix.CreateScale(zoom, zoom, 0.0f);

            base.TriggerEfx();
        }

        protected override Matrix[] ApplyMatrices()
        {
            return new Matrix[1] { matrix };
        }
    }
}
